<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/page/common/common_header.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>日志录入</title>

<script src='${baseURL }/js/jquery.min.js'></script>

<script type="text/javascript" src="${baseURL }/package/js/itcui.min.js"></script>
<script type="text/javascript" src="${baseURL }/js/itcui.js"></script>
<script type="text/javascript" src="${baseURL }/js/public.js"></script>
<script type="text/javascript" src="${baseURL }/js/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="${baseURL }/js/jquery-ui-1.10.3.custom.min.js"></script>

<!-- toolbar css  -->
<link rel="stylesheet" type="text/css" href="${baseURL }/css/content_table.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/itcui.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/base.css" media="all"/>
<link rel="stylesheet" type="text/css" href="${baseURL }/css/smoothness/jquery-ui-1.10.3.custom.min.css" media="all"/>

<script type="text/javascript" src="http://10.0.250.52/uidev/package/js/itcui.dev.js"></script>
<link rel="stylesheet" type="text/css" href="http://10.0.250.52/uidev/package/css/itcui.dev.css" media="all"/>

<script type="text/javascript" src="${baseURL }/js/operationlog/logDetail.js?version=1.2"></script>
<script type="text/javascript" src="${baseURL }/js/common/addTab.js?version=1.2"></script>

<script type="text/javascript">
$(function(){
	//用来标记交班走到那一步骤
	var flag = 0;
	
	//新建运行记事
	$("#newOperation").click(function(){
		var url = "${baseURL}/page/workconsole/operationSave.jsp";
		var date = new Date().getTime();
		addTab( "newOperation" + date,  "增加运行记事", url );
	});
	
	//交班
	$("#jiaoBan").click(function(){
		flag = 1;
		selectShow( flag );
	});
	
	
	$("#preStep").click(function(){
		flag -- ;
		if( flag < 0 ){
			flag = 0;
			step0();
		}else{
			selectShow( flag );
		}
	});
	$("#nextStep").click(function(){
		flag ++ ;
		if( flag > 4 ){
			flag = 0;
			step0();
		}else{
			selectShow( flag );
		}
	});
	
});

</script>
<script type="text/javascript">

	$(function(){
		jiaoban();
		
		var fields = [
			  			{title : "日期", id : "dayTime", type : "date"},
			  			{title : "值次", id : "duty"},
			  			{title : "值班人员", id : "dutyPerson"}
			  		];
		
		$("#searchForm").ITC_Form({},fields);
		var data = {
				"dayTime" : "2014-05-19",
				"duty" : "1值",
				"weather":"晴",
				"dutyPerson":"李四"
			};
			$("#searchForm").ITC_Form("loaddata",data);
			$("#f_dayTime").val("2014-05-20");
			$("#searchForm").ITC_Form("readonly");
			
			var fields1 = [
				  			{title : "记事时间", id : "noteTime", type : "datetime"},
				  			{	title : "机组号", 
				  				id : "crewNum",
				  				type : "combobox",
				  				data : [
						  				["jizu1","机组#1"],
						  				["jizu2","机组#2"],
						  				["jizu3","机组#3"],
						  				["jizu4","机组#4"]
						  			]	
				  			},
				  			{	title : "记录类型",
				  				id : "keyword",
				  				type : "combobox",
				  				data : [
						  				["bju1","接班重要参数"],
						  				["bju2","值班记录"]
						  			]
				  			},
				  			{	title : "记事内容", 
				  				id : "noteContent",
				  				type : "textarea",
				  		        linebreak:true,
				  		        wrapXsWidth:12,
				  		        wrapMdWidth:12,
				  		        labelMdWidth:1,
				  		        labelXsWidth:125,
				  		        inputXsWidth:875	
				  			}
				  		];
			$("#noteForm").ITC_Form({},fields1);
		//填充列表数据
		for(var i = 1; i < 15; i ++ ){
			newrow3( i , true );
			newrow2( i );
		}
		$("#jiebanContent").val("#1机组备用，#2机组备用，一次调频投入；厂用电分段运行；220kV库长线、英长线、#1主变在运行状态；35kV南长线有压，301、601、602开关在运行状态；603开关在“试验”位置。");
		$("#jiaobanContent").val("");
		
		$("#chkbox_*").click(function(){
			var data1 = {
					"noteTime" : "2014-05-05 16:28:30",
					"noteContent":"签发 机械班 机械工作票，工作内容为：1~5泄洪闸门及定期检查"
				};
			$("#noteForm").ITC_Form("loaddata",data1);
			$("#f_noteTime").val("2014-05-05 16:28:30");
			$("#saveNote").html("修改");
			//$("#submitNote").show();
		});
		
	});
</script>

</head>
<body class="ml12 mr12 mt12"  >
	<div class="btn-group btn-group-sm" id="toolBarDiv">
    	<button type="button" class="btn btn-default" id="jiaoBan">交班</button>
	</div>
	
	<div class="row btn-group-sm" id="processDiv" style="display: none;">
	    <button type="button" class="btn btn-default" id="preStep">上一步</button>
	    <button type="button" class="btn btn-default" id="nextStep">下一步</button>
	    <button type="button" class="btn btn-default" onclick="step0();">取消</button>
	</div>
	<div class="row btn-group-sm" style="display: none;" id="jiaobanToolbar">
		<button type="button" class="btn btn-success" >完成</button>
		<button type="button" class="btn btn-default" onclick="step0();">取消</button>
	</div>
	
	<div id="form_main">
		<div id="heardDiv" style="height: auto;width: 100%;">
			<div id="base_info" class="itcui_frm_grp_title" style="width:100%">
				<span class="itcui_frm_grp_title_arrow  itcui_frm_grp_title_arrow_expand" id="base_info_arrow"></span>
				<span class="itcui_frm_grp_title_txt">值班员日志</span>
			</div>
			<form action="" id="searchForm" class="autoform"></form>
		</div>
		
			
		<div id="detail" class="itcui_frm_grp_title" style="width:100%;">
			<span class="itcui_frm_grp_title_arrow itcui_frm_grp_title_arrow_expand" id="detail_arrow"></span>
			<span class="itcui_frm_grp_title_txt">交接班情况</span>
		</div>
		<div id="detail_subitem" style="width:100%;margin-top: 8px;">
			<div class="itcui_frm_row" style="height:65px">
				<span class="itcui_frm_field_name" style="float:left">接班情况：</span>
				<textarea id="jiebanContent" style="float:left;width:600px;height:60px;overflow: hidden;resize: none;border: 0px;font-size: 14px;" readonly="readonly"></textarea>
			</div>
		</div>
		
		<div id="operation" class="itcui_frm_grp_title" style="width:100%">
			<span class="itcui_frm_grp_title_arrow itcui_frm_grp_title_arrow_expand" id="detail_arrow"></span>
			<span class="itcui_frm_grp_title_txt">运行记事</span>
		</div>
		<div id="operationDetail" style="width:100%;margin-top: 8px;">
			<div id="noteDiv" style="margin-bottom: 8px;">
				<form action="" id="noteForm" class="noteForm"></form>
				<div class="row btn-group-sm" id="" style="margin-left: 35px;">
				    <button type="button" class="btn btn-default" style="width: 73px;" id="saveNote">保存</button>
				    <button type="button" class="btn btn-default"  style="width: 73px;">取消</button>
				</div>
			</div>
			<table class="itcui_table" id="operationData" style="clear:both;width: 100%;">
				<tr style="height:24px">
					<th width="26"><span class="itcui_chkbox"></span></th>
					<th width="140" class="th_sortable">记录时间</th>
					<th width="100" class="th_sortable">记录类型</th>
					<th width="80" class="th_sortable">机组号</th>
					<th width="500" class="th_sortable">记录内容</th>
					<th width="80" class="th_sortable">记录人</th>
				</tr>
			</table>
		
		</div>
		
		<div id="quartz" class="itcui_frm_grp_title" style="width:100%;display: none;">
			<span class="itcui_frm_grp_title_arrow itcui_frm_grp_title_arrow_expand" id="detail_arrow"></span>
			<span class="itcui_frm_grp_title_txt">定期工作</span>
		</div>
		<div id="quartzDetail" style="width:100%;margin-top: 8px;display: none;">
			<div id="quartzTable">
				<table class="itcui_table" id="quartzData" style="clear:both" width="100%" cellspacing="0">
					<tr style="height:24px">
						<th width="140" class="th_sortable">计划日期</th>
						<th width="200" class="th_sortable">工作内容</th>
						<th width="100" class="th_sortable">工作类型</th>
						<th width="80" class="th_sortable">部门</th>
						<th width="80" class="th_sortable">负责人</th>
						<th width="140" class="th_sortable">计划执行时间</th>
						<th width="80" class="th_sortable">执行时限</th>
						<th width="80" class="th_sortable">时限类型</th>
						<th width="80" class="th_sortable">状态</th>
					</tr>
			</table>
			</div>
		</div>
		
		<div id="jiaobanFormDiv" style="display: none;">
			<form action="" id="jiaobanForm" class="autoform"></form>	
		</div>
	</div>

</body>
</html>